use std::{env };
mod bucket;
mod search_app;
mod scoop_app;
mod cli_args;

use cli_args::{ parse_args  };
use scoop_app:: { Scoop} ;
use crate::cli_args::run;


fn main() {
    let scoop = Scoop::new();
    let args    = parse_args(env::args()).expect("Failed to parse arguments");
    let result =  run( &scoop, &args  );
    match result {
        Ok(()) => {
            std::process::exit(1);
            }
        Err(err) => {
            eprintln!("Error: {}", err);
            std::process::exit(1);
        }
    };

}
